import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UserModule } from './user/user.module';
import { LoginModule } from './login/login.module';
import { SpiderModule } from './spider/spider.module';
import { MangerModule } from './manger/manger.module';
import {} from 'typeorm';
import { TypeOrmModule } from '@nestjs/typeorm';

@Module({
  imports: [
    UserModule,
    LoginModule,
    SpiderModule,
    MangerModule,
    TypeOrmModule.forRoot({
      type: 'mysql',
      username: 'root',
      password: 'root123',
      host: 'localhost',
      port: 3306,
      database: 'users',
      synchronize: true,
      retryAttempts: 10,
      retryDelay: 500,
      autoLoadEntities: true,
    }),
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
